function [B] = BlinkDurPop(var)


load('D:\Users\zhaga\Documents\MATLAB\AFOSR_Data\Subjects\SubFolderList.mat')
cnt = 0;

B = zeros(1,5);
for i = 1:length(SubFolderList(:,3))
    SubNum = SubFolderList{i,3};
    HOME = strcat('D:\Users\zhaga\Documents\MATLAB\AFOSR_Data\Subjects\Sub_0', num2str(SubNum),'\ToUpload\');
   if(i == 65 | i == 11 | i==13 | i==21 | i==50 | i ==53 | i == 71)
       continue
   end
   for j = 1:2
        cd(HOME);
        load(strcat('Blinks_S0',num2str(SubNum),'_',int2str(j),'.mat'));
        %BLINKDur{i,j} = Blinks(:,3);                    %Blink Duration
        %BLINKCof{i,j} = Blinks(:,8);                    %Blink confidence
        mask = Blinks(:,8) > 0.24;
        tmp_b = Blinks(mask,:);
        for k = 1:length(tmp_b(:,1))
            B(end+1,1) = i;
            B(end,2) = j;
            B(end,3) = tmp_b(k,2);
            B(end,4) = tmp_b(k,3);
            B(end,5) = tmp_b(k,8);
        end
   end
end
B(1,:)=[];
mask1 = B(:,3)<=0;
B(mask1,:) = [];




%{

%figure;
%hold on;
cnt = 0;
for cc = 0.1:0.001:0.6
    cnt = cnt + 1;
D = 0;
C = 0;
for i = 1:83
    for j = 1:2
        if(~isempty(BLINKDur{i,j}))
        %   plot(BLINKDur{i,j},BLINKCof{i,j},'.','MarkerFaceColor','black','MarkerSize', 1 )
            tmp = BLINKDur{i,j};
            tmp_ = BLINKCof{i,j};
           D =  [D; tmp(tmp_ > cc) ];
           C =  [ C; tmp_];
        end
        
    end
end

D(1)=[];
mD(cnt) = mean(D);
sD(cnt) = std(D);
end


%figure;
%hold on;
cnt = 0;
%for cc = 0.1:0.001:0.6
cnt = cnt + 1;
D = 0;
C = 0;
for i = 1:83
    for j = 1:2
        if(~isempty(BLINKDur{i,j}))
        %   plot(BLINKDur{i,j},BLINKCof{i,j},'.','MarkerFaceColor','black','MarkerSize', 1 )
            tmp = BLINKDur{i,j};
            tmp_ = BLINKCof{i,j};
           D =  [D; tmp(tmp_ > cc) ];
           C =  [ C; tmp_];
           
        end
        
    end
end

D(1)=[];
mD(cnt) = mean(D);
sD(cnt) = std(D);
end

%}


%{
for i = 1:83
    if(~isempty(BLINKS{i,1}))
        
%}



